package com.mspbots.cw.request;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * @ClassName com.mspbots.cw.request.TenantTimeLogDTO
 * @Description TODO
 * @Author Jun
 * @Date 2019/9/12 18:44
 * @Version 1.0
 **/
@Data
public class TenantTimeLogDTO {

    private Long id;
    /**
     * tenId
     */
    private Long tenantId;

    private String tenantName;
    /**
     * tenUserId
     */
    private Long tenantUserId;

    private String teamsUserId;

    private String tenantUserName;
    private LocalDate oneDay;
    /**
     * beginDate
     */
    private LocalDateTime beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginDateStart;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginDateEnd;
    /**
     * endDate
     */
    private LocalDateTime endDate;
    private LocalDateTime createDate;

    private LocalDateTime createDateStart;
    private String source;
    /**
     * lunchDate
     */
    private LocalDateTime lunchDate;
    /**
     * backLunch
     */
    private LocalDateTime backLunchDate;
    /**
     * format:
     * { "breakMap":[
     * {beginTime: 2019-06-19T05:44:00,endTime: 2019-06-19T05:44:00},
     * {beginTime: 2019-06-19T05:44:00,endTime: 2019-06-19T05:44:00}
     * ]}
     */
    private JsonNode extend;

    /**
     * breakTime ,saved in extend json ,eg: { "breakMap":[{beginTime: 2019-06-19T05:44:00,endTime: 2019-06-19T05:44:00}] }
     */
    private transient List<Map> breakMap;
    /**
     * sum, (out-in/now)-(backLunchDate-lunchDate) minutes
     */
    private transient int totalTime;

}
